
#ifndef __HANDLE_REQUEST_H__
#define __HANDLE_REQUEST_H__

#include "../iocp/IOCP/fileio.h"
#include "../include/lpcds_def.h"
#include <map>


#define CHandleProcessPtr  CHandleProcess::GetInstance()

class CHandleProcess
{
public:
    CHandleProcess();
    ~CHandleProcess();

    static CHandleProcess& GetInstance();

    BOOL DispathRequest(BoxMessage uMessage, HIOCPFILE hObject, PNET_BUFFER Buffer);
private:

    typedef void(*PFN_PROCESS_HANDLE_PROC)(HIOCPFILE hObject, PVOID Buffer, ULONG Size);

    static void ProcessStart(HIOCPFILE hObject, PVOID Buffer, ULONG Size);
    static void ConnectAccess(HIOCPFILE hObject, PVOID Buffer, ULONG Size);
    static void VirtualClipBoard(HIOCPFILE hObject, PVOID Buffer, ULONG Size);
    static void VirtualServices(HIOCPFILE hObject, PVOID Buffer, ULONG Size);
    static void VirtualServiceControl(HIOCPFILE hObject, PVOID Buffer, ULONG Size);
private:
    std::map<BoxMessage, PFN_PROCESS_HANDLE_PROC> m_ProcessRequest;
};

typedef struct __PROCESS_DATA {
    WCHAR strFullPath[MAX_PATH];
    WCHAR strProcessName[128];
    DWORD dwProcess;
    PNET_BUFFER Buffer;
}PROCESS_DATA, * PPROCESS_DATA;




#endif